﻿@model Model1.Waarde
@{
    ViewBag.Title = "Zoeken";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Zoeken</h2>
@using (Html.BeginForm("Zoeken","Waarde")) {
@Html.AntiForgeryToken()
    <fieldset>
        <legend>Waarde</legend>
        <div style="width:410px; float: left;">
                @foreach (Model1.Groep item in ViewBag.Groepen)
                {
                    <ul style="list-style: none; margin: 15px 0; border-style: solid; width:390px; padding: 5px 5px 25px 5px;">
                        <li style="width: 200px; font-size: 20px; font-weight: bold;">@item.Naam</li>
                        <li>
                            @foreach (Model1.Specificatie specificatie in item.Specificaties)
                            {
                                if (specificatie.Type == "1")
                                {
                                    <li style="border-top-style: solid; font-weight: bold;">@specificatie.Naam</li>
                                    <li>
                                        <div class="editor-field" style="width: 400px; float: left;">
                                            @Html.Raw("Ja")
                                            @Html.RadioButton("Naam[" + specificatie.Id + "]", "Ja", ((@Request.Form["Naam[" + specificatie.Id + "]"] == "Ja")? true : false))
                                            @Html.Raw("Nee")
                                            @Html.RadioButton("Naam[" + specificatie.Id + "]", "Nee", ((@Request.Form["Naam[" + specificatie.Id + "]"] == "Nee") ? true : false))
                                            @Html.Raw("Beide")
                                            @Html.RadioButton("Naam[" + specificatie.Id + "]", "Beide", ((@Request.Form["Naam[" + specificatie.Id + "]"] != "Ja" && @Request.Form["Naam[" + specificatie.Id + "]"] != "Nee") ? true : false))
                                            @Html.ValidationMessageFor(m => m.Naam)
                                            @Html.Raw("<br/>")
                                        </div>
                                    </li>
                                }
                            }
                        </li>
                    </ul>
                }
        </div>
        <div style="float: left; padding: 5px; border-style: solid; margin: 15px 0; overflow-x:scroll; width: 500px;">
            <input type="submit" value="Zoeken" style="width:490px;" />
            @foreach (Model1.Groep item in ViewBag.Groepen)
            {
                <table style="">
                    <h3>@item.Naam</h3>
                    @foreach (Model1.Specificatie item2 in item.Specificaties)
                    {
                        <tr>
                            <td style="width: 200px; padding: 0 10px; border: solid 1px #a7a7a7; background-color: #cbcaca; ">
                                <b>@item2.Naam</b>
                            </td>
                            @foreach (Model1.Waarde item3 in item2.Waardes)
                            {
                                <td style="width: 150px; border: solid 1px #a7a7a7; padding: 0 5px;">
                                    @item3.Naam
                                </td>
                            }
                        </tr>
                    }
                </table>
            }
        </div>
    </fieldset>
}
